<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'addgoods.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript">
$(function(){
			$.ajax({
				url : "${pageContext.request.contextPath}/goods/findgoodstype.action",
				type : "POST",
				dataType : "json", 
				data : {
				},
				success : function(result, start, resp) {
				var str = "";
				for(var i=0;i<result.length;i++){
					str +="<option value="+result[i].uuid+">"+result[i].name+"</option>";
				}
				$("#sid").html(str);
			 }
		});
	});	
	</script>
  </head>
  
  <jsp:include page="/jsp/css.jsp"></jsp:include>
<body>

	<!-- top.jsp -->
	<jsp:include page="/jsp/top.jsp"></jsp:include>

	<!-- header.jsp -->
	<jsp:include page="/jsp/header.jsp"></jsp:include>

	<div class="content">
		<!-- left -->
		<jsp:include page="/jsp/left.jsp"></jsp:include>
		<div class="mainbar">

			<!-- Page heading -->
			<jsp:include page="/jsp/topshou.jsp"></jsp:include>

			<!-- Matter -->
			<div class="matter">
				<div class="container">
			<h4><span class="page_title">商品管理</span></h4>
	<div class="container">
		<form method="post" class="form-inline" action="${pageContext.request.contextPath}/goods/addgoods.action">
		<label for="exampleInputName2">商品类别:</label> 
			<select class="kuan" id="sid" name="goodsTypeUuid">
						<option value="-1">----请-选-择----</option>
				</select>
			<div class="form-group">
				<label for="exampleInputName2">商&nbsp;品&nbsp;名:</label> 
				<input type="text"
					class="form-control" id="name1" size="18" name="name" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p>
				
			<div class="form-group">
				<label for="exampleInputName2">生产厂家:</label> 
				<input type="text"
					class="form-control" id="producer1" size="18" name="producer" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<div class="form-group">
				<label for="exampleInputName2">产地:</label> 
				<input type="text"
					class="form-control" id="producer1" size="18" name="origin" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p>
			<div class="form-group">
				<label for="exampleInputName2">单&nbsp;&nbsp;&nbsp;&nbsp;位:</label> 
				<input type="text"
					class="form-control" id="unit1" size="18" name="unit" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<div class="form-group">
			<label for="exampleInputName2">进货价格:</label> 
				<input type="text"
					class="form-control" id="inPrice1" size="18" name="inPrice" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p>
			<div class="form-group">
			<label for="exampleInputName2">销售价格:</label> 
				<input type="text"
					class="form-control" id="outPrice1" size="18" name="outPrice" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<div class="form-group">
			<label for="exampleInputName2">体积:</label> 
				<input type="text"
					class="form-control" id="" size="18" name="useNum" value="">
				</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<button type="submit" class="btn btn-default">添加</button><p>
		 <table  class="table table-bordered" id="t1">
		 
		 </table>
		</form>
	</div>
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="js/bootstrap.min.js"></script>
				</div>
			</div>
		</div>

		<!-- Mainbar ends -->
		<div class="clearfix"></div>

	</div>

	<!-- Footer starts -->
	<jsp:include page="/jsp/butter.jsp"></jsp:include>

	<!-- Footer ends -->

	<!-- Scroll to top -->
	<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>
	
	<jsp:include page="/jsp/js.jsp"></jsp:include>
	
</body>
</html>
